/* ===================================================================
   GLOBAL STYLES - General HTML elements and base styling
   ================================================================== */

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
}

body {
  text-align: center;
  font-family: "Roboto", sans-serif;
}

.section {
  height: 100vh;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

#link {
  color: #57a3f5;
  font-weight: 700;
  margin-right: 1px;
}

#italic {
  font-weight: 400;
  font-style: italic;
}

::-webkit-scrollbar {
  width: 10px;
  background-color: #f5f5f5; 
}

::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3); 
}

body.alert-open ::-webkit-scrollbar {
  background-color: #ccc; 
}

body.alert-open ::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.1); 
}




/* ===================================================================
   ANIMATION KEYFRAMES - All animation definitions
   ================================================================== */

@keyframes Rbluec {
  from {
    color: #57a3f5;
  }
  to {
    color: white;
  }
}

@keyframes bluec {
  from {
    color: white;
  }
  to {
    color: #57a3f5;
  }
}

@keyframes btnbcolor {
  from {
    background-color: none;
  }
  to {
    background-color: #57a3f5;
  }
}

@keyframes Rbtnbcolor {
  from {
    background-color: #57a3f5;
  }
  to {
    background-color: none;
  }
}

@keyframes Rbtncolor {
  from {
    color: white;
  }
  to {
    color: black;
  }
}

@keyframes btncolor {
  from {
    color: black;
  }
  to {
    color: white;
  }
}

@keyframes bevegPilOpp {
  from {
    transform: translate(0) rotate(-90deg);
  }
  to {
    transform: translate(0, -10px) rotate(-90deg);
  }
}




/* ===================================================================
   NAVIGATION - Header navigation and contact button
   ================================================================== */

#navbar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 50%;
  font-family: "Roboto", sans-serif;
  gap: 32px;
  z-index: 5;
}

.navknapper {
  float: none;
  display: inline-block;
  font-size: 14px;
  color: #1e293b;
  text-align: center;
  padding: 8px 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-decoration: none;
  border-radius: 6px;
}

.navknapper:hover {
  color: #57a3f5;
  transform: translateY(-2px);
}

.navknapper[aria-current="page"], 
.navknapper[aria-current="page"] b, 
#infoknapp {
  color: #57a3f5 !important;
  font-weight: 800;
}

#kontaktknapp {
  background-color: white;
  position: absolute;
  right: 20px;
  top: 25px;
  font-size: 14px;
  color: #57a3f5;
  text-align: center;
  padding: 0px 16px;
  border: 2px solid #57a3f5;
  border-radius: 5px;
  padding-top: 2px;
  padding-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.5s, color 0.5s, transform 0.4s ease-in-out;
}

#kontaktknapp:hover {
  background-color: #57a3f5;
  color: white;
}




/* ===================================================================
   SECTION 1 - PAGE HEADER AND TABLE OF CONTENTS
   ================================================================== */

.page-header {
  margin: 0 auto;
  max-width: 800px;
  text-align: center;
  padding-top: 100px;
}

#info-tittel1, #info-tittel2 {
  text-align: center;
  margin: 0;
  line-height: 1.1;
}

#info-tittel1 {
  font-size: 45px;
  font-weight: 400;
  font-style: italic;
  color: #333;
}

#info-tittel2 {
  font-size: 50px;
  font-weight: bold;
  margin-top: 10px;
  color: #57a3f5;
}

#main-subtitle {
  font-size: 18px;
  color: #666;
  margin-top: 20px;
  margin-bottom: 30px;
  font-style: italic;
  font-weight: 300;
}

.toc-section {
  padding: 60px 20px 60px;
}

.toc {
  max-width: 1000px;
  margin: 0 auto;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 600px;
  margin: 0 auto;
}

.toc-item {
  display: flex;
  align-items: center;
  padding: 8px 15px;
  background: white;
  border-radius: 0;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  border-left: 4px solid #57a3f5;
}

.toc-item:hover {
  transform: translateY(-3px);
  color: #57a3f5;
}

.toc-text {
  font-size: 16px;
  font-weight: 500;
  text-align: left;
}

.content-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 100px auto 0 auto;
}

.content-section h2 {
  color: #2c3e50;
  margin-bottom: 25px;
  position: relative;
}

.content-section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #57a3f5;
  border-radius: 2px;
}



/* ===================================================================
   SECTION 2 - FAGPAKKER (Digital Resources)
   ================================================================== */

#title {
  font-size: 35px;
  text-transform: uppercase;
  padding-top: 0px;
  font-weight: bold;
  font-family: "Roboto", sans-serif;
}

#teksten {
  font-size: 18px;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 30px;
}

.box {
  border: 3px solid #57a3f5;
  padding: 20px;
  border-radius: 8px;
  height: 180px;
  margin-bottom: 0px;
  background: white;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
}

.box:hover::before {
  left: 100%;
}

.box:hover {
  transform: translateY(-5px);
  cursor: pointer;
}

.box h2 {
  font-size: 20px;
  margin-top: 0px;
}





/* ===================================================================
   SECTION 3 - BETALING (Payment and Pricing)
   ================================================================== */

#betaling {
  padding-top: 0px;
}

#tittel {
  font-size: 35px;
  text-transform: uppercase;
}

.info-section {
  margin-bottom: 50px;
  text-align: left;
  margin-left: 150px;
  margin-right: 100px;
}

.info-section h3 {
  flex: 0 0 auto;
  margin-bottom: 5px;
}

.info-section p {
  display: inline;
  flex: 1 1 auto;
}

#førsteinfo {
  margin-top: 40px;
}





/* ===================================================================
   SECTION 4 - VILKÅR OG BETINGELSER (Terms and Conditions)
   ================================================================== */

#seksjon {
  padding-top: 0px;
}

.blokk {
  padding-bottom: 50px;
  margin-bottom: 30px;
}

.blokk h3 {
  margin-bottom: -10px;
}

#blokk1 {
  padding-top: 20px;
}

.text {
  font-size: 18px;
  text-align: left;
  margin-left: 180px;
  max-width: 1000px;
  line-height: 1.5;
}






/* ===================================================================
   SECTION 5 - BLI PRIVATLÆRER (Become a Private Teacher)
   ================================================================== */

#innhold {
  padding-top: 0px;
}

#grid-container {
  grid-template-columns: repeat(4, 1fr);
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-gap: 15px;
  margin-top: 21.5px;
}

#grid-container h3 {
  margin-top: 10px;
}

.grid-item {
  border: 2px solid #57a3f5;
  padding: 10px;
  border-radius: 5px;
  background-color: white;
  height: 140px;
}

.info {
  font-size: 15px;
  margin-top: -10px;
}





/* ===================================================================
   SECTION 6 - PERSONVERN (Privacy Policy)
   ================================================================== */

#første {
  font-size: 18px;
  line-height: 1.5;
}

.personvern-section {
  max-width: 800px;
  padding: 20px;
  margin: auto;
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
  padding-bottom: 0px;
  margin-bottom: 30px;
}

.personvern-section h2 {
  font-size: 24px;
  text-align: center;
}

.personvern-section h3 {
  font-size: 20px;
  margin-top: 0px;
}

.personvern-section p {
  margin-top: 10px;
  margin-bottom: -30px;
}

.personvern-section a {
  color: #007bff;
  text-decoration: none;
}





/* ===================================================================
   GLOBAL ELEMENTS - Back to top arrow
   ================================================================== */

#arrowImg {
  position: fixed;
  width: 30px;
  animation: bevegPilOpp 1s infinite alternate;
  z-index: 99;
  right: 1%;
  top: 2.5%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#arrowImg:hover {
  cursor: pointer;
}





/* ===================================================================
   RESPONSIVE STYLES - Mobile and tablet adjustments
   ================================================================== */

/* Responsive design for mobile and tablets */
@media (max-width: 768px) {
  #navbar {
    width: 90%;
    flex-direction: column;
    gap: 10px;
    top: 20px;
  }
  
  .navknapper {
    font-size: 12px;
    padding: 8px 12px;
  }
  
  #kontaktknapp {
    position: relative;
    right: auto;
    top: auto;
    margin-top: 10px;
  }
  
  .page-header {
    padding-top: 120px;
  }
  
  #info-tittel1 {
    font-size: 35px;
  }
  
  #info-tittel2 {
    font-size: 40px;
  }
  
  .grid-container {
    grid-template-columns: 1fr;
    max-width: 90%;
  }
  
  #grid-container {
    grid-template-columns: 1fr;
    max-width: 90%;
  }
  
  .info-section {
    margin-left: 20px;
    margin-right: 20px;
  }
  
  .text {
    margin-left: 20px;
    margin-right: 20px;
  }
  
  .toc-list {
    max-width: 90%;
  }
}

@media (max-width: 480px) {
  #info-tittel1 {
    font-size: 28px;
  }
  
  #info-tittel2 {
    font-size: 32px;
  }
  
  .page-header {
    padding-top: 140px;
  }
  
  .box, .grid-item {
    height: auto;
    min-height: 180px;
  }
}